package com.zhouyu.exampledesignmoudle.proxy;

import org.springframework.scheduling.annotation.Async;
import org.springframework.stereotype.Service;
@Service
public class Myservice {

    @Async
    public void test1(){
        System.out.println(Thread.currentThread().getName()+"->我是test1");
    }

    public void test2(){
        System.out.println(Thread.currentThread().getName()+"->我是test2");
        //使用this不会使aop生效
        this.test1();
    }
}
